-- GENERATED SPELL FOR [Sepulchral Overseer] --


function spell0_23993(pUnit, Event) --@Chains of Ice,n/a--
pUnit:FullCastSpellOnTarget(22744,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23993', 11000, 1)
end

function spell1_23993(pUnit, Event) --@Curse of the Sepulcher,n/a--
pUnit:FullCastSpellOnTarget(43556,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23993', 628, 1)
end

function spell2_23993(pUnit, Event) --@Frostbolt,Self--
pUnit:FullCastSpellOnTarget(12737,pUnit)
pUnit:RegisterEvent('Sorts_23993', 7000, 1)
end

function Sorts_23993(pUnit, Event)
local choix_sorts_23993 = math.random(0, 2)
if choix_sorts_23993 == 0 then
pUnit:RegisterEvent('spell0_23993', 1, 1)
end
if choix_sorts_23993 == 1 then
pUnit:RegisterEvent('spell1_23993', 1, 1)
end
if choix_sorts_23993 == 2 then
pUnit:RegisterEvent('spell2_23993', 1, 1)
end
end

function mob23993_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23993', math.random(1500, 3000), 1)
end

function mob23993_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23993_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23993_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23993, 1, 'mob23993_Action')
RegisterUnitEvent(23993, 2, 'mob23993_Leave')
RegisterUnitEvent(23993, 3, 'mob23993_Kill')
RegisterUnitEvent(23993, 4, 'mob23993_Die')
